FROM bewithmeallmylife/11.1.1-cudnn8-runtime-ubuntu18.04-conda-python3.8-qt5:1.0.0
USER root

RUN  apt-get install ffmpeg  -y
RUN  apt-get install ninja-build  -y
RUN  apt-get install libglib2.0-0  -y
RUN  apt-get install libsm6 -y
RUN  apt-get install libxrender-dev -y
RUN  apt-get install libxext6 -y


ENV PATH /root/anaconda3/bin:$PATH
SHELL ["conda", "run", "-n", "python3.8", "/bin/bash", "-c"]


RUN pip install decord>=0.4.1 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install einops -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install matplotlib -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install numpy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install opencv-contrib-python -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install Pillow -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install scipy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

RUN pip install torch==1.8.1+cu111  -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install torchvision==0.9.1+cu111  -f https://download.pytorch.org/whl/torch_stable.html

RUN pip install -U openmim
RUN mim install mmcv-full
RUN pip install mmdet  -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install opencv_python -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

#sudo docker build -t='bewithmeallmylife/mmaction2-runtime-cuda-11.1.1:1.0.0' .